package com.dianziq.im.server.cmd;


public class Msg extends Action {

	/* (non-Javadoc)
	 * @see com.dianziq.im.server.cmd.Cmd#handle(com.dianziq.im.server.cmd.Context)
	 */
	@Override
	public void handle(Context c) {
	 
		int userId=c.getUserId();
		if(userId==0){
			c.sendError("Cannot find user!");
			return;
		}
		c.service.onMsg(userId, c.getIntParam("tuid"), c.ch, c.getParam("msg"));
		c.sendOK("{}");
 
	}
}
